import request   from "../utils/request";
export function getList(url, params) {
  return request({
    url,
    method: "GET",
    params,
  });
}
export function postList(url, data) {
  return request({
    url,
    method: "POST",
    data
  });
}
// import request from "../utils/request";

// ymz
export const getData = async () => {
    let result = await request.get('/ymz/getData').then(res => {
        return {
            infos:res.data.infosData.map(item => {
                return {
                    QRCode: item.QRCode,
                    account: item.account,
                    collect: JSON.parse(item.collect),
                    friendCircle: JSON.parse(item.friendCircle),
                    headPortrait: item.headPortrait,
                    id: item.id,
                    info_id: item.info_id,
                    name: item.name,
                    pass: item.pass,
                    phoneNum: item.phoneNum,
                    sex: item.sex,
                    signature: item.signature,
                    site: item.site,
                }
            }),
            friendData:res.data.friendData
        }
    })
    return result 
}
